package projet_v1.items.weapons;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import projet_v1.Breed;
import projet_v1.Vampire;

/**
 * 
 * @author Romain Roufast
 *
 */

public class TestWoodenStake {
	
	private WoodenStake w;

	@Before
	public void setUp() throws Exception {
		w = new WoodenStake();
	}

	@After
	public void tearDown() throws Exception {
		w = null;
	}

	@Test
	public void testHit() {
		Vampire v = new Vampire(100);
		w.hit(v);
		assertEquals(150, w.getDamages(Breed.VAMPIRE));
	}

	@Test
	public void testGetCategory() {
		assertEquals(CategoryWeapon.WOODENSTAKE, w.getCategory());
	}

	@Test
	public void testGetAccurancy() {
		assertEquals(1, w.getAccurancy(),0);
	}


	@Test
	public void testGetDamages() {
		assertEquals(3, w.getDamages().size());
	}

	@Test
	public void testGetDamagesBreed() {
		assertEquals(150, w.getDamages(Breed.VAMPIRE));
		assertEquals(0, w.getDamages(Breed.ZOMBIE));
		assertEquals(0, w.getDamages(Breed.MADZOMBIE));
	}

	@Test
	public void testHasAmmo() {
		assertEquals(false, w.hasAmmo());
	}

}
